package com.javasm.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.io.Serializable;

/**
 * 后台用户(AdminUser)实体类
 *
 * @author makejava
 * @since 2025-06-19 15:31:32
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class AdminUser implements Serializable {
    private static final long serialVersionUID = -29852404623696482L;

    private Long uid;
/**
     * 用户名
     */
    private String username;
/**
     * 密码
     */
    private String password;
/**
     * 角色id -1超级管理员 1管理员2普通用户3渠道
     */
    private Long roleId;
/**
     * 注册时间
     */
//String   不需要计算日期
//Long     需要计算日期(存毫秒数)
    private String regTime;
//    private Date regTime;
/**
     * 登录时间
     */
    private String loginTime;
//    private Date loginTime;
/**
     * =1有效 =0无效
     */
    private Integer isvalid;
/**
     * 创建人
     */
    private Long createUid;
/**
     * 备注
     */
    private String remark;

    private String headImg;


    //查询列表时使用的创建人名称
    private String createUsername;

    public AdminUser(String username, Integer isvalid) {
        this.username = username;
        this.isvalid = isvalid;
    }


    public AdminUser(Long uid, String username, String password, Integer isvalid, String headImg) {
        this.uid = uid;
        this.username = username;
        this.password = password;
        this.isvalid = isvalid;
        this.headImg = headImg;
    }
}

